﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Text;

namespace ABCNet.UserFinancialLists
{
    /// <summary>
    /// 用户账户流水表
    /// </summary>
    [Table("N_UserFinancialLists")]
    public class UserFinancialList : Abp.Domain.Entities.Auditing.CreationAuditedEntity
    {
        /// <summary>
        /// 客户Id
        /// </summary>
        public long UserId { get; set; }

        /// <summary>
        /// 业务类型
        /// </summary>
        public UBusinessTypes UBusinessType { get; set; }

        /// <summary>
        /// 业务类型名称
        /// </summary>
        [StringLength(256)]
        public string UBusinessTypeName { get; set; }

        /// <summary>
        /// 改变之前
        /// </summary>
        public decimal BeforeChangedAmount { get; set; }

        /// <summary>
        /// 改变之后
        /// </summary>
        public decimal AfterChangedAmount { get; set; }

        /// <summary>
        /// 金额
        /// </summary>
        public decimal ChangedAmount { get; set; }

        /// <summary>
        /// 业务Id
        /// </summary>
        public int? BusinessId { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        [StringLength(256)]
        public string Remark { get; set; }

        /// <summary>
        /// 交易用户Id
        /// </summary>
        public long? TradingUserId { get; set; }

    }

    /// <summary>
    /// 业务类型
    /// </summary>
    public enum UBusinessTypes : int
    {
        用户提现 = 0,
        用户转账 = 1,
        点位收益 = 3,
        推荐注册 = 4,
        用户充值 = 5,
        提现回退 = 6,
        用户扣费 = 7,
        提现手续费 = 8,
        撤销提现手续费 = 9,
        撤销用户提现 = 10,
        收益扣税 = 11
    }
}
